import Vue from "vue";
import Router from "vue-router";
import Eltree from "@/views/eltree.vue";

Vue.use(Router);

export default new Router({
  mode: "history",
  base: process.env.BASE_URL,
  routes: [
    {
      path: "/eltree",
      name: "Eltree",
      component: Eltree
    },
    {
      path: "/message",
      name: "message",
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () =>
        import(/* webpackChunkName: "about" */ "@/views/message.vue")
    },
    {
      path: "/componentRefresh",
      name: "componentRefresh",
      component: () => import("@/views/componentRefresh.vue"),
      redirect:"/componentRefresh/componentRefreshChild",
      children:[
        {
          path:"/componentRefresh/componentRefreshChild",
          name:"componentRefreshChild",
          component:() => import("@/views/componentRefreshChild.vue")
        }
      ]
    },
    {
      path: "/blur",
      name: "blur",
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () =>
          import(/* webpackChunkName: "about" */ "@/views/BlurDiv.vue")
    }
  ]
});
